﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.Purchase.ReceiptOrder
{
    public class ReceiptOrders:AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 到货通知单号
        /// </summary>
        public string NoticeNo { get; set; }
        /// <summary>
        /// 客户订单号
        /// </summary>
        public string CustomerNode { get; set; }

        /// <summary>
        /// 货主
        /// </summary>
        public string Shipper { get; set; }

        /// <summary>
        /// 托盘
        /// </summary>
        public string? Tray { get; set; }

        /// <summary>
        /// 储位
        /// </summary>
        public string? StorageLocation { get; set; }

        /// <summary>
        /// 是否已上架（可改用 bool 类型，界面下拉框映射“是/否”）
        /// </summary>
        public bool? IsShelved { get; set; }

        /// <summary>
        /// 商品
        /// </summary>
        public string? Product { get; set; }
        /// <summary>
        /// 商品编码
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string? Unit { get; set; }

        /// <summary>
        /// 到货数量
        /// </summary>
        public int? ArrivalQty { get; set; }

        /// <summary>
        /// 数量（若与“到货数量”语义不同，需区分；若相同可合并）
        /// </summary>
        public int? Qty { get; set; }

        /// <summary>
        /// 体积
        /// </summary>
        public decimal? Volume { get; set; }

        /// <summary>
        /// 重量
        /// </summary>
        public decimal? Weight { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProductionDate { get; set; }

        /// <summary>
        /// 批次
        /// </summary>
        public string? Batch { get; set; }

        /// <summary>
        /// 收货温度
        /// </summary>
        public decimal? ReceiptTemperature { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 入重量（命名可更明确，如“入库重量”）
        /// </summary>
        public decimal? InWeight { get; set; }

        /// <summary>
        /// 出重量（命名可更明确，如“出库重量”；若为收货单，可能需确认业务逻辑）
        /// </summary>
        public decimal? OutWeight { get; set; }
        protected ReceiptOrders() { }

        public ReceiptOrders(Guid id, string noticeNo, string customerNode, string shipper, string? tray, string? storageLocation, bool? isShelved, string? product, string? productCode, string? unit, int? arrivalQty, int? qty, decimal? volume, decimal? weight, DateTime? productionDate, string? batch, decimal? receiptTemperature, string? remark, decimal? inWeight, decimal? outWeight) : base(id)
        {
            Id = id;
            NoticeNo = noticeNo;
            CustomerNode = customerNode;
            Shipper = shipper;
            Tray = tray;
            StorageLocation = storageLocation;
            IsShelved = isShelved;
            Product = product;
            ProductCode = productCode;
            Unit = unit;
            ArrivalQty = arrivalQty;
            Qty = qty;
            Volume = volume;
            Weight = weight;
            ProductionDate = productionDate;
            Batch = batch;
            ReceiptTemperature = receiptTemperature;
            Remark = remark;
            InWeight = inWeight;
            OutWeight = outWeight;
        }
    }
}
